/*********************************************************************
	Rhapsody	: 7.5 
	Login		: kbe
	Component	: DefaultComponent 
	Configuration 	: CodeConfig
	Model Element	: ReactorServer
//!	Generated Date	: Thu, 27, Sep 2012  
	File Path	: DefaultComponent\CodeConfig\ReactorServer.h
*********************************************************************/

#ifndef ReactorServer_H
#define ReactorServer_H

//#[ ignore
#ifdef _MSC_VER
// disable Microsoft compiler warning (debug information truncated)
#pragma warning(disable: 4786)
#endif
//#]

//## auto_generated
#include <oxf\oxf.h>
//## auto_generated
#include <string>
//## auto_generated
#include <algorithm>
//## auto_generated
#include "Default.h"
//## auto_generated
#include <oxf\omreactive.h>
//## auto_generated
#include <oxf\state.h>
//## auto_generated
#include <oxf\event.h>
//## auto_generated
#include "SOCK_WrapperFacade.h"
//## dependency Acceptor
template <class SERVICE_HANDLER, class IPC_ACCEPTOR> class Acceptor;

//## dependency AlarmEvent
class AlarmEvent;

//## dependency LF_EventHandler
class LF_EventHandler;

//## dependency LogEvent
class LogEvent;

//## dependency PatientEvent
class PatientEvent;

//## dependency Reactor
class Reactor;

//## dependency ThreadPool
class ThreadPool;

//## package Default

//## class ReactorServer
class ReactorServer : public OMReactive {
    ////    Constructors and destructors    ////
    
public :

    //## auto_generated
    ReactorServer(IOxfActive* theActiveContext = 0);
    
    //## auto_generated
    ~ReactorServer();
    
    ////    Additional operations    ////
    
    //## auto_generated
    virtual bool startBehavior();

protected :

    //## auto_generated
    void initStatechart();
    
    ////    Framework operations    ////
    
    ////    Framework    ////

public :

    //## operation CreateEventHandler()
    void CreateEventHandler();
    
    //## operation Initialize()
    void Initialize();
    
    //## auto_generated
    Reactor* getItsReactor() const;

protected :

    //## auto_generated
    void cleanUpRelations();
    
    Reactor* itsReactor;		//## link itsReactor

public :

    //## operation SimulateEvents()
    void SimulateEvents();
    
    // rootState:
    //## statechart_method
    inline bool rootState_IN() const;
    
    //## statechart_method
    virtual void rootState_entDef();
    
    //## statechart_method
    virtual IOxfReactive::TakeEventStatus rootState_processEvent();
    
    // WaitRegisterHandles:
    //## statechart_method
    inline bool WaitRegisterHandles_IN() const;
    
    // Idle:
    //## statechart_method
    inline bool Idle_IN() const;
    
    // HandleEvents:
    //## statechart_method
    inline bool HandleEvents_IN() const;

protected :

//#[ ignore
    enum ReactorServer_Enum {
        OMNonState = 0,
        WaitRegisterHandles = 1,
        Idle = 2,
        HandleEvents = 3
    };
    
    int rootState_subState;
    
    int rootState_active;
//#]
};

inline bool ReactorServer::rootState_IN() const {
    return true;
}

inline bool ReactorServer::WaitRegisterHandles_IN() const {
    return rootState_subState == WaitRegisterHandles;
}

inline bool ReactorServer::Idle_IN() const {
    return rootState_subState == Idle;
}

inline bool ReactorServer::HandleEvents_IN() const {
    return rootState_subState == HandleEvents;
}

#endif
/*********************************************************************
	File Path	: DefaultComponent\CodeConfig\ReactorServer.h
*********************************************************************/
